package userkey

import (
	"fmt"
	"navi-mumbai/common/key/walletkey"
)

// 奖励活动类型
const (
	ActivityIdRegister    int64 = 1 // 注册送金币
	ActivityIdLuckyReward int64 = 2 // 幸运奖励
	ActivityIdLogin       int64 = 3 // 每日登陆送金币
)

// reward type
const (
	RewardTypeGold int64 = 300 // 金币
)

const RewardMoneyName = "GOLD"

// 注册送金币数量
const RegisterRewardMoneyAmount = "10"

// 幸运奖励金币数量
const LuckyRewardMoneyAmount = "1000"

// 每日登陆送金币数量
const LoginRewardMoneyAmount = "0"

// reward state
const (
	RewardStateCreated  int64 = 1 // 未领取
	RewardStateReceived int64 = 2 // 已领取
	RewardStateCancel   int64 = 3 // 已取消
)

// reward limit
const (
	LuckyRewardLimit = 3 // 幸运奖励每日领取次数
)

// activity reward title content
const (
	RewardSourceTypeRegisterTitle   = "Registration Bonus!"
	RewardSourceTypeRegisterContent = "Congratulations! You have received a registration bonus of %s %s."

	RewardSourceTypeLoginTitle   = "Login Bonus!"
	RewardSourceTypeLoginContent = "Congratulations! You have received a registration bonus of %s %s."

	RewardSourceTypeLuckyRewardTitle   = "Lucky Reward"
	RewardSourceTypeLuckyRewardContent = "Congratulations! You have received a lucky reward of %s %s."
)

func GetRewardTitleAndContent(activityId int64) (tt string, ct string) {
	switch activityId {
	case ActivityIdRegister:
		tt = RewardSourceTypeRegisterTitle
		ct = fmt.Sprintf(RewardSourceTypeRegisterContent, RegisterRewardMoneyAmount, walletkey.GetMoneyNameByMoneyType(walletkey.UsingCurrencyType))
	case ActivityIdLuckyReward:
		tt = RewardSourceTypeLuckyRewardTitle
		ct = fmt.Sprintf(RewardSourceTypeLuckyRewardContent, LuckyRewardMoneyAmount, walletkey.GetMoneyNameByMoneyType(walletkey.UsingCurrencyType))
	case ActivityIdLogin:
		tt = RewardSourceTypeLoginTitle
		ct = fmt.Sprintf(RewardSourceTypeLoginContent, LoginRewardMoneyAmount, walletkey.GetMoneyNameByMoneyType(walletkey.UsingCurrencyType))
	default:
		return
	}

	return
}
